<template>
    <SearchTitle v-if="SearchTitleifType.indexOf(store.tabType) != -1" />
    <div class="content" v-if="lsbjifType.indexOf(store.tabType) != -1">
        <div class="CenterBox">
            <TopTextSwitching width="70%" />
            <HomePage v-if="store.tabType == '首页'" />
            <supplyAndDemand v-if="store.tabType == '供需信息'" />
            <MallEntrance v-if="store.tabType == '商城入口'" />
        </div>
    </div>
    <NewsInformation v-if="store.tabType == '新闻动态'" />
    <div class="qybj" v-if="logoifType.indexOf(store.tabType) != -1">
        <qiyeTopText />
        <div class="CenterBox">
            <div class="logoFlexBox">
                <img class="logoBox" src="../assets/logo.png" alt="">
                <div class="logoTextBox">“临产临用” 查企业</div>
                <div style="width: 60%;"><searchBox /></div>
            </div>
            <TopTextSwitching width="70%" />
            <Information v-if="store.tabType == '企业信息'" />
            <finance v-if="store.tabType == '金融信息'" />
            <ExhibitionHall v-if="store.tabType == '展会大厅'" />
        </div>
    </div>
</template>

<script setup>
import SearchTitle from '@/components/general/SearchTitle.vue';
import qiyeTopText from '@/components/general/qiyeTopText.vue';
import TopTextSwitching from '@/components/general/TopTextSwitching.vue';
import HomePage from '@/components/HomePage.vue';
import NewsInformation from '@/components/NewsInformation.vue';
import Information from '@/components/Information.vue';
import finance from '@/components/finance.vue';
import MallEntrance from '@/components/MallEntrance.vue';
import supplyAndDemand from '@/components/supplyAndDemand.vue';
import searchBox from '@/components/general/searchBox.vue';
import ExhibitionHall from '@/components/ExhibitionHall.vue';
import { ref } from 'vue';
import { useStore } from '@/store/store';
const store = useStore();

const SearchTitleifType = ref(['首页', '新闻动态', '供需信息', '商城入口']);
const logoifType = ref(['企业信息','金融信息','展会大厅']);
const lsbjifType = ref(['首页', '供需信息', '商城入口']);

</script>

<style scoped lang="scss">
.content {
    width: 100%;
    height: 100%;
    padding-bottom: 60px;
    min-height: calc(100vh - 60px);
    background: url("@/assets/index/topbj.png") no-repeat;
    background-size: 100%;
    background-color: #f3f9fe;
}

.qybj {
    width: 100%;
    height: 100%;
    padding-bottom: 60px;
    min-height: calc(100vh - 60px);
    background: url("@/assets/qybj.png") no-repeat;
    background-size: 100%;
    background-color: #f3f9fe;
}
.logoFlexBox {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 70px;
}
.logoBox {
    width: 120px;
    height: 120px;
}

.logoTextBox {
    text-align: center;
    font-weight: bold;
    font-size: 50px;
    color: #2B893A;
    margin-top: 10px;
    margin-bottom: 20px;
}
</style>